package com.householditemtwo.common.utils;

import com.google.gson.Gson;

/**
 * 处理生成结果
 * @author Administrator
 *
 */
public class Result {

	private int code;

	private String msg;

	private Integer count;

	private Object data;

	public static String toClient(int code, String msg, Integer count, Object data) {
		Result r = new Result();

		r.code = code;
		r.msg = msg;
		r.count = count;
		r.data = data;

		Gson t = new Gson();
		return t.toJson(r);
	}

	public int getCode() {
		return code;
	}

	public void setCode(int code) {
		this.code = code;
	}

	public String getMsg() {
		return msg;
	}

	public void setMsg(String msg) {
		this.msg = msg;
	}

	public Integer getCount() {
		return count;
	}

	public void setCount(Integer count) {
		this.count = count;
	}

	public Object getData() {
		return data;
	}

	public void setData(Object data) {
		this.data = data;
	}

}
